<div id="template">
    <ul>
        <?php foreach($ls as $ll){ ?>
        <li>
            <a href="#1" data-periodo="<?=$ll['periodo']; ?>">
                <span class="no-dcp">Período</span>
                <span class="professor"><?=$ll['disciplinas']; ?> matérias</span>
                <span class="periodo"><?=$ll['periodo']; ?>&ordm;</span>
            </a>
        </li>
        <?php } ?>
    </ul>
</div>